<?php
/**
 * Template Name:create_fuzhuang
 * 
 * 生成服装搭配栏目静态页面
 * 
 * 
 * 服装搭配自定义字段子分类数字代表意义：
 * 6：流行服装搭配
 * 2：春夏秋冬服装搭配
 * 3：女生服装搭配
 * 4：服装搭配技巧
 */

$smarty = smarty_get_instance();

//服装搭配分类ID
$fu_catid = 3;

//第一行第一列_幻灯片
$first_first = catid_article(121,$fu_catid,3);

//第一行第二列_hot
$first_second = catid_article(122,$fu_catid,1);


//第一行第三列 热点
$first_third_top = catid_article(148,$fu_catid,8);

//第一行第三列 热点
$first_third_buttom_left_top = subcatid( 149, $fu_catid, 1, 2 );
$first_third_buttom_left_middle = subcatid( 149, $fu_catid, 1, 3 );
$first_third_buttom_left_buttom = subcatid( 149, $fu_catid, 1, 4 );
$first_third_buttom_right_top = subcatid( 149, $fu_catid, 1, 5 );
$first_third_buttom_right_middle = subcatid( 149, $fu_catid, 1, 6 );
$first_third_buttom_right_buttom = catid_article( 149, $fu_catid, 10 );


//流行服装搭配：第二行第一列
$second_first = subcatid( 134, $fu_catid, 1, 6 );

//流行服装搭配：第二行第二列，Top
$second_second_top = subcatid(132,$fu_catid,3,6);

//流行服装搭配：第二行第二列，buttom
$second_second_buttom = subcatid(132,$fu_catid,4,6);

//流行服装搭配：第二行第三列，Top
$second_third_top = subcatid( 133, $fu_catid, 8, 6 );

//流行服装搭配：第二行第三列，buttom
$second_third_buttom = subcatid( 133, $fu_catid, 1, 6 );


// 春夏秋冬服装到配：第三行第一列
$third_first = subcatid( 134, $fu_catid, 1, 2 );

//春夏秋冬服装到配：第三行第二列，Top
$third_second_top = subcatid( 132, $fu_catid, 3, 2 );

//春夏秋冬服装到配：第三行第二列，buttom
$third_second_buttom = subcatid( 132, $fu_catid, 4, 2 );

//春夏秋冬服装到配：第三行第三列，Top
$third_third_top = subcatid( 133, $fu_catid, 8, 2 );

//春夏秋冬服装到配：第三行第三列，buttom
$third_third_buttom = subcatid( 133, $fu_catid, 1,2 );


// 女生服装到配：第四行第一列
$forth_first = subcatid( 134, $fu_catid, 1, 3 );

//女生服装到配：第四行第二列，Top
$forth_second_top = subcatid( 132, $fu_catid, 3, 3 );

//女生服装到配：第四行第二列，buttom
$forth_second_buttom = subcatid( 132, $fu_catid, 4, 3 );

//女生服装到配：第四行第三列，Top
$forth_third_top = subcatid( 133, $fu_catid, 8, 3 );

//女生服装到配：第四行第三列，buttom
$forth_third_buttom = subcatid( 133, $fu_catid, 1,3 );

//第二三四行，第二列：编辑推荐
$secondTF_second = catid_article(150,$fu_catid,8);


//服装搭配技巧：第五行第一列左边
$five_first_left = subcatid( 135, $fu_catid, 1,4 );

//服装搭配技巧：第五行第一列右边上
$five_first_right_top = subcatid( 136, $fu_catid, 4,4 );

//服装搭配技巧：第五行第一列右边下
$five_first_right_buttom = subcatid( 133, $fu_catid, 3,4 );

//男生服装搭配：第五行第二列
$five_second_left = subcatid( 135, $fu_catid, 1,5 );

//服装搭配技巧：第五行第二列右边上
$five_second_right_top = subcatid( 136, $fu_catid, 4,5 );

//服装搭配技巧：第五行第二列右边下
$five_second_right_buttom = subcatid( 133, $fu_catid, 3,5 );

$smarty->assign( "first_first", $first_first );
$smarty->assign( "first_second", $first_second );
$smarty->assign( "first_third_top", $first_third_top );
$smarty->assign( "first_third_buttom_left_top", $first_third_buttom_left_top );
$smarty->assign( "first_third_buttom_left_middle", $first_third_buttom_left_middle );
$smarty->assign( "first_third_buttom_left_buttom", $first_third_buttom_left_buttom );
$smarty->assign( "first_third_buttom_right_top", $first_third_buttom_right_top );
$smarty->assign( "first_third_buttom_right_middle", $first_third_buttom_right_middle );
$smarty->assign( "first_third_buttom_right_buttom", $first_third_buttom_right_buttom );

$smarty->assign( "second_first", $second_first );
$smarty->assign( "second_second_top", $second_second_top );
$smarty->assign( "second_second_buttom", $second_second_buttom );
$smarty->assign( "second_third_top", $second_third_top );
$smarty->assign( "second_third_buttom", $second_third_buttom );
$smarty->assign( "secondTF_second", $secondTF_second );

$smarty->assign( "third_first", $third_first );
$smarty->assign( "third_second_top", $third_second_top );
$smarty->assign( "third_second_buttom", $third_second_buttom );
$smarty->assign( "third_third_top", $third_third_top );
$smarty->assign( "third_third_buttom", $third_third_buttom );

$smarty->assign( "forth_first", $forth_first );
$smarty->assign( "forth_second_top", $forth_second_top );
$smarty->assign( "forth_second_buttom", $forth_second_buttom );
$smarty->assign( "forth_third_top", $forth_third_top );
$smarty->assign( "forth_third_buttom", $forth_third_buttom );



$smarty->assign( "five_first_left", $five_first_left );
$smarty->assign( "five_first_right_top", $five_first_right_top );
$smarty->assign( "five_first_right_buttom", $five_first_right_buttom );

$smarty->assign( "five_second_left", $five_second_left );
$smarty->assign( "five_second_right_top", $five_second_right_top );
$smarty->assign( "five_second_right_buttom", $five_second_right_buttom );

$content = $smarty->fetch("fuzhuangdapei.tpl");
$fp= fopen("/home/admin/tueye/wordpress/wp-content/themes/tueye/fuzhuangdapei.html","w");
fwrite($fp,$content );
fclose($fp);
?>